package com.shawn.spring.boot.flowable.mapper;

import com.shawn.spring.boot.flowable.vo.TaskVO;
import org.flowable.task.api.Task;
import org.springframework.stereotype.Component;

@Component
public class TaskBOVOMapper {

  public TaskVO toTaskVO(Task task) {
    return TaskVO.builder()
        .id(task.getId())
        .name(task.getName())
        .taskData(task.getProcessVariables())
        .build();
  }
}
